package com.appwoo.txtws.activity;

import android.annotation.SuppressLint;
import android.app.Dialog;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnCancelListener;
import android.content.DialogInterface.OnDismissListener;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.database.ContentObserver;
import android.database.Cursor;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.media.RingtoneManager;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.provider.CallLog.Calls;
import android.provider.MediaStore.Images.Media;
import android.telephony.TelephonyManager;
import android.text.Editable;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.view.WindowManager;
import android.view.WindowManager.LayoutParams;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.AnimationUtils;
import android.view.animation.TranslateAnimation;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.PopupWindow;
import android.widget.ProgressBar;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import android.widget.Toast;
import com.appwoo.txtws.app.App;
import com.appwoo.txtws.app.AppActivity;
import com.appwoo.txtws.bean.AutoSoftInfo;
import com.appwoo.txtws.component.DBHelper;
import com.appwoo.txtws.component.FilterSoft;
import com.appwoo.txtws.component.Global;
import com.appwoo.txtws.component.RqSP;
import com.appwoo.txtws.component.StatusProtect;
import com.appwoo.txtws.service.AuthSoftsServer;
import com.appwoo.txtws.service.RecomSoftServer;
import com.appwoo.txtws.service.WeatherService;
import com.appwoo.txtws.service.WebTimeControlService;
import com.appwoo.txtws.thread.APKDownloadTask;
import com.appwoo.txtws.util.Configure;
import com.appwoo.txtws.util.DateAdapter;
import com.appwoo.txtws.util.DialogConfigure;
import com.appwoo.txtws.util.DialogDateAdapter;
import com.appwoo.txtws.util.DialogDragGrid;
import com.appwoo.txtws.util.DialogDragGrid.G_ItemChangeListener;
import com.appwoo.txtws.util.DialogDragGrid.G_PageListener;
import com.appwoo.txtws.util.DragGrid;
import com.appwoo.txtws.util.DragGrid.G_ItemChangeListener;
import com.appwoo.txtws.util.DragGrid.G_PageListener;
import com.appwoo.txtws.util.ScrollLayout;
import com.appwoo.txtws.util.ScrollLayout.PageListener;
import com.appwoo.txtws.util.ShortcutInfo;
import com.appwoo.txtws.util.ShowShortcutUtils;
import java.io.File;
import java.io.PrintStream;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;

public class MainActivity extends AppActivity
  implements View.OnClickListener
{
  public static final String ACTION_Refresh_DATE = "refreshDate";
  public static final String ACTION_Refresh_Data = "refreshData";
  public static final String ACTION_Refresh_Market = "refreshMarket";
  public static final String ACTION_Refresh_TIME = "refreshTime";
  public static final String ACTION_Refresh_WEATHER = "refreshWeather";
  private static final int DIALOG_SET_WALLPAPER = 7;
  private static final int HOST_ID = 1024;
  private static final int MY_CREATE_APPWIDGET = 2;
  private static final int MY_REQUEST_APPWIDGET = 1;
  private static final int Notification = 1;
  private static final int REQUEST_CODE_WALLPAPER = 8;
  private static final int Ringtone = 0;
  public static final String SP_KEY_WALLPAPER = "wallpaper";
  public static final String SP_WALLPAPER_TYPE = "wallpaperType";
  public static final String SP_WALLPAPER_VALUE = "wallpaperValue";
  public static int currenfoldergv = 0;
  public static int currenfolderlist = 0;
  public static int dragDialogPosition = -1;
  public static int intMarketRecdCount = 0;
  public static Boolean isRefreshMarket = Boolean.valueOf(false);
  public static int isSoftMoving = 0;
  private List<String> Datas;
  private int PAGE_SIZE = 16;
  private RadioButton camera = null;
  private TextView date;
  private DBHelper dbHelper;
  private Dialog dialog;
  private Dialog dialogedit;
  private DisplayMetrics dm;
  Animation down;
  List<PackageInfo> getinfo;
  private DragGrid gridView;
  ArrayList<DragGrid> gridviews;
  private TextView hourLeft;
  LayoutInflater inflater = null;
  boolean isClean = false;
  private Boolean isRefresh = Boolean.valueOf(false);
  private int isbind;
  TranslateAnimation left;
  ArrayList<ArrayList<AutoSoftInfo>> lists = new ArrayList();
  Locale locale;
  ArrayList<AutoSoftInfo> lstDate = new ArrayList();
  private BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver()
  {
    public void onReceive(Context paramAnonymousContext, Intent paramAnonymousIntent)
    {
      String str = paramAnonymousIntent.getAction();
      try
      {
        if (str.equals("refreshData"))
        {
          if (("com.appwoo.txtws.activity.MainActivity".equals(Global.GetTopActivity(paramAnonymousContext))) && (MainActivity.isSoftMoving == 0))
          {
            SetupAppForChildActivity.isSendBoradcast = Boolean.valueOf(false);
            MainActivity.this.logDebug("zhydownload �����ctivity,�跺�骞挎�锛��濮���版���);
            MainActivity.this.refreshData();
            return;
          }
          MainActivity.this.logDebug("zhydownload 涓��褰��activity,�跺�骞挎�锛���锋��版�");
          MainActivity.this.isRefresh = Boolean.valueOf(true);
          return;
        }
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
        return;
      }
      if (str.equals("refreshMarket"))
      {
        if (("com.appwoo.txtws.activity.MainActivity".equals(Global.GetTopActivity(paramAnonymousContext))) && (Configure.curentPage == 0) && (MainActivity.isSoftMoving == 0))
        {
          MainActivity.isRefreshMarket = Boolean.valueOf(false);
          MainActivity.this.logDebug("zhydownload �����ctivity,�跺�骞挎�锛��濮���板��ㄥ��烘������);
          ((DateAdapter)((DragGrid)MainActivity.this.gridviews.get(Configure.curentPage)).getAdapter()).notifyDataSetChanged();
          return;
        }
        MainActivity.this.logDebug("zhydownload 涓��褰��activity,�跺�骞挎�锛���锋��版�");
        MainActivity.isRefreshMarket = Boolean.valueOf(true);
        return;
      }
      if (str.equals("refreshTime"))
      {
        MainActivity.this.hourLeft.setText(WeatherService.strHore);
        MainActivity.this.minuteLeft.setText(WeatherService.strMin);
        return;
      }
      if ("refreshWeather".equals(str))
      {
        MainActivity.this.updateWeather();
        return;
      }
      if ("refreshDate".equals(str))
        MainActivity.this.date.setText(WeatherService.getData(MainActivity.this.getResources()));
    }
  };
  private ImageView mIvWidgetMainWeather;
  private LinearLayout mLinearMain;
  private TelephonyManager mTelephonyManager;
  private TextView mTvWidgetMainCityname;
  private TextView mTvWidgetMainDate;
  private TextView mTvWidgetMainLoading;
  private TextView mTvWidgetMainScopre;
  private TextView mTvWidgetMainWeather;
  private TextView minuteLeft;
  private RadioButton msg = null;
  private int newCallCount;
  private int newSmsCount;
  private TextView no_sms;
  private TextView no_telephone;
  private int numColumns = 4;
  private int numRows = 4;
  private PackageManager packageManager;
  LinearLayout.LayoutParams param;
  private ProgressBar pb;
  private LinearLayout pb_layout;
  private RadioButton phone = null;
  private PopupWindow popupWindow;
  private RadioGroup rgPage;
  TranslateAnimation right;
  int rockCount = 0;
  private RqSP rp;
  private int screenHeight;
  private int screenWidth;
  private RadioButton setting = null;
  private SharedPreferences share;

  @SuppressLint({"SimpleDateFormat"})
  private SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-DD HH:mm");
  private SimpleDateFormat simpleDateFormatDate = new SimpleDateFormat("yyyy-MM-DD");
  private ScrollLayout sl;
  private String systemLanguage;
  Animation up;
  private View vWeather;
  private String wallpaperType;
  private String wallpaperValue;
  private WindowManager wm;

  private boolean CheckNetwork()
  {
    ConnectivityManager localConnectivityManager = (ConnectivityManager)getSystemService("connectivity");
    NetworkInfo localNetworkInfo = localConnectivityManager.getActiveNetworkInfo();
    boolean bool = false;
    if (localNetworkInfo != null)
      bool = localConnectivityManager.getActiveNetworkInfo().isAvailable();
    return bool;
  }

  private void changeParentid(int paramInt, ArrayList<ShortcutInfo> paramArrayList)
  {
    int i = 0;
    if (i >= paramArrayList.size())
      return;
    label83: for (int j = 0; ; j++)
    {
      if (j >= this.lstDate.size());
      while (true)
      {
        i++;
        break;
        if (!((ShortcutInfo)paramArrayList.get(i)).getPackageName().equals(((AutoSoftInfo)this.lstDate.get(j)).getAspkg()))
          break label83;
        ((AutoSoftInfo)this.lstDate.get(j)).setAsParentid(paramInt);
      }
    }
  }

  private void delGVItem(int paramInt)
  {
    int i = 0;
    AutoSoftInfo localAutoSoftInfo = (AutoSoftInfo)((ArrayList)this.lists.get(Configure.curentPage)).get(paramInt);
    String str1;
    int j;
    String str2;
    int k;
    label78: label79: String[] arrayOfString;
    int n;
    if (localAutoSoftInfo.getAsIsFolder() == 1)
    {
      this.dbHelper.delSoft(localAutoSoftInfo);
      str1 = "";
      j = 0;
      if (j < localAutoSoftInfo.getContents().size())
        break label101;
      str2 = "";
      k = 0;
      if (k < this.lists.size())
        break label148;
      break label171;
      arrayOfString = str2.split(",");
      n = arrayOfString.length;
    }
    while (true)
    {
      if (i >= n)
      {
        return;
        label101: str1 = str1 + ((ShortcutInfo)localAutoSoftInfo.getContents().get(j)).getPackageName() + ",";
        j++;
        break;
        label148: for (int m = 0; ; m++)
        {
          if (m >= ((ArrayList)this.lists.get(k)).size())
          {
            label171: if (str1.length() <= 0)
              break label79;
            k++;
            break;
          }
          if (str1.contains(((AutoSoftInfo)((ArrayList)this.lists.get(k)).get(m)).getAspkg() + ","))
          {
            str1 = str1.replace(((AutoSoftInfo)((ArrayList)this.lists.get(k)).get(m)).getAspkg() + ",", "");
            if (!str2.contains(k + ","))
              str2 = k + ",";
            ((AutoSoftInfo)((ArrayList)this.lists.get(k)).get(m)).setAsParentid(0);
            ((AutoSoftInfo)((ArrayList)this.lists.get(k)).get(m)).setAsFolderName("");
            ((AutoSoftInfo)((ArrayList)this.lists.get(k)).get(m)).setAsIsFolder(0);
            ((AutoSoftInfo)((ArrayList)this.lists.get(k)).get(m)).setAsIsChanged(1);
            ((AutoSoftInfo)((ArrayList)this.lists.get(k)).get(m)).clearAll();
            if (str1.length() <= 0)
              break label78;
          }
        }
      }
      String str3 = arrayOfString[i];
      try
      {
        ((DateAdapter)((DragGrid)this.gridviews.get(Integer.parseInt(str3))).getAdapter()).notifyDataSetChanged();
        logDebug("refresh page:" + str3);
        i++;
      }
      catch (Exception localException)
      {
        while (true)
          localException.printStackTrace();
      }
    }
  }

  private void dialogEditFolder(Context paramContext, final int paramInt)
  {
    View localView = getLayoutInflater().inflate(2130903088, null);
    this.screenHeight = getWindowManager().getDefaultDisplay().getHeight();
    this.screenWidth = getWindowManager().getDefaultDisplay().getWidth();
    this.dialogedit.setContentView(localView);
    WindowManager.LayoutParams localLayoutParams = this.dialogedit.getWindow().getAttributes();
    localLayoutParams.width = (4 * this.screenWidth / 5);
    localLayoutParams.y = -60;
    this.dialogedit.setContentView(localView, localLayoutParams);
    final EditText localEditText = (EditText)localView.findViewById(2131493082);
    localEditText.setText(((AutoSoftInfo)((ArrayList)this.lists.get(currenfoldergv)).get(currenfolderlist)).getAsFolderName());
    if (((AutoSoftInfo)((ArrayList)this.lists.get(currenfoldergv)).get(currenfolderlist)).getAsFolderName() == null);
    for (int i = 0; ; i = ((AutoSoftInfo)((ArrayList)this.lists.get(currenfoldergv)).get(currenfolderlist)).getAsFolderName().length())
    {
      localEditText.setSelection(i);
      TextView localTextView1 = (TextView)localView.findViewById(2131492905);
      TextView localTextView2 = (TextView)localView.findViewById(2131492906);
      localTextView1.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          String str = localEditText.getText().toString();
          if (!str.equals(""))
          {
            MainActivity.this.dbHelper.updateFolderName(paramInt, str);
            ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).setAsFolderName(str);
            MainActivity.this.dialogedit.dismiss();
            return;
          }
          MainActivity.this.alertMessage(MainActivity.this.getString(2131428234));
        }
      });
      localTextView2.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          MainActivity.this.dialogedit.dismiss();
        }
      });
      this.dialogedit.show();
      return;
    }
  }

  private void dialogFolder(final Context paramContext, final int paramInt)
  {
    isSoftMoving = 1;
    DialogConfigure.init(this);
    View localView = getLayoutInflater().inflate(2130903169, null);
    this.screenHeight = getWindowManager().getDefaultDisplay().getHeight();
    this.screenWidth = getWindowManager().getDefaultDisplay().getWidth();
    if (this.dialog != null)
      this.dialog = null;
    this.dialog = new Dialog(paramContext, 2131361815);
    this.dialog.setContentView(localView);
    WindowManager.LayoutParams localLayoutParams = this.dialog.getWindow().getAttributes();
    localLayoutParams.width = ((int)(4.5D * this.screenWidth / 5.0D));
    localLayoutParams.y = -60;
    localLayoutParams.height = ((int)(3.5D * this.screenHeight / 5.0D));
    this.dialog.setContentView(localView, localLayoutParams);
    final TextView localTextView = (TextView)localView.findViewById(2131493348);
    localTextView.setText(((AutoSoftInfo)((ArrayList)this.lists.get(currenfoldergv)).get(currenfolderlist)).getAsFolderName());
    if ((currenfoldergv != 0) || (currenfolderlist > 10))
      localTextView.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          if (MainActivity.this.dialogedit != null)
            MainActivity.this.dialogedit = null;
          MainActivity.this.dialogedit = new Dialog(paramContext, 2131361815);
          MainActivity.this.dialogedit.setOnDismissListener(new DialogInterface.OnDismissListener()
          {
            public void onDismiss(DialogInterface paramAnonymous2DialogInterface)
            {
              this.val$tvName.setText(((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).getAsFolderName());
              ((DateAdapter)((DragGrid)MainActivity.this.gridviews.get(Configure.curentPage)).getAdapter()).notifyDataSetChanged();
              if (Configure.curentPage == 0)
                MainActivity.isRefreshMarket = Boolean.valueOf(false);
            }
          });
          MainActivity.this.dialogEditFolder(MainActivity.this, paramInt);
        }
      });
    LinearLayout localLinearLayout = (LinearLayout)localView.findViewById(2131493216);
    final ArrayList localArrayList1;
    if (paramInt == 0)
      localArrayList1 = new DBHelper(this).getAutoSoftInfo("0", -1, -1, 0);
    try
    {
      while (true)
      {
        localLinearLayout.addView(addDialogGridView(localArrayList1, paramInt, this.dialog));
        this.dialog.setOnCancelListener(new DialogInterface.OnCancelListener()
        {
          public void onCancel(DialogInterface paramAnonymousDialogInterface)
          {
            MainActivity.this.logDebug("cancel");
            AutoSoftInfo localAutoSoftInfo;
            int i;
            String str5;
            String str6;
            label333: int i2;
            int i3;
            if (MainActivity.dragDialogPosition >= 0)
            {
              localAutoSoftInfo = (AutoSoftInfo)localArrayList1.get(MainActivity.dragDialogPosition);
              if (localAutoSoftInfo.getActivityName() == null)
              {
                MainActivity.isSoftMoving = 0;
                return;
              }
              ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).removeByPackageName(((AutoSoftInfo)localArrayList1.get(MainActivity.dragDialogPosition)).getAspkg(), ((AutoSoftInfo)localArrayList1.get(MainActivity.dragDialogPosition)).getActivityName());
              i = 0;
              if (((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).getContents().size() != 1)
                break label896;
              String str3 = ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).getAspkg();
              String str4 = ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).getActivityName();
              if ((!localAutoSoftInfo.getAspkg().equals(str3)) || (!localAutoSoftInfo.getActivityName().equals(str4)))
                break label469;
              str5 = ((ShortcutInfo)((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).getContents().get(0)).getPackageName();
              str6 = ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).getActivityName();
              if (((MainActivity.currenfoldergv != 0) || (MainActivity.currenfolderlist > 7)) && ((MainActivity.currenfoldergv != 1) || (MainActivity.currenfolderlist > 2)))
                break label484;
              MainActivity.this.setDeskicon(MainActivity.currenfoldergv, MainActivity.currenfolderlist);
              ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).setAsIsChanged(1);
              i2 = 0;
              i3 = 0;
              if (i3 < MainActivity.this.lists.size())
                break label603;
              label383: MainActivity.this.dbHelper.changeToNoFolder((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist));
              if (Configure.curentPage != i)
                break label1815;
              ((DateAdapter)((DragGrid)MainActivity.this.gridviews.get(Configure.curentPage)).getAdapter()).notifyDataSetChanged();
              if (Configure.curentPage != 0);
            }
            label469: label603: label1503: for (MainActivity.isRefreshMarket = Boolean.valueOf(false); ; MainActivity.isRefreshMarket = Boolean.valueOf(false))
              label484: label888: label890: 
              do
              {
                MainActivity.isSoftMoving = 0;
                return;
                str5 = localAutoSoftInfo.getAspkg();
                str6 = localAutoSoftInfo.getActivityName();
                break;
                ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).setAsFolderName("");
                ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).setAsParentid(0);
                ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).setAsIsFolder(0);
                ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).clearAll();
                break label333;
                for (int i4 = 0; ; i4++)
                {
                  if (i4 >= ((ArrayList)MainActivity.this.lists.get(i3)).size());
                  while (true)
                  {
                    if (i2 != 0)
                      break label888;
                    i3++;
                    break;
                    if ((!str5.equals(((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(i3)).get(i4)).getAspkg())) || (!str6.equals(((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(i3)).get(i4)).getActivityName())))
                      break label890;
                    i = i3;
                    ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(i3)).get(i4)).setAsParentid(0);
                    ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(i3)).get(i4)).setAsFolderName("");
                    ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(i3)).get(i4)).setAsIsFolder(0);
                    ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(i3)).get(i4)).setAsIsChanged(1);
                    ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(i3)).get(i4)).clearAll();
                    MainActivity.dragDialogPosition = -1;
                    MainActivity.this.dbHelper.changeToNoFolder((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(i3)).get(i4));
                    i2 = 1;
                  }
                  break label383;
                }
                if ((localAutoSoftInfo.getAsParentid() == localAutoSoftInfo.getAsid()) && (((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).getContents().size() > 1))
                {
                  String str1 = ((ShortcutInfo)((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).getContents().get(0)).getPackageName();
                  String str2 = ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).getActivityName();
                  for (int n = 0; ; n++)
                  {
                    int i1 = ((ArrayList)MainActivity.this.lists.get(Configure.curentPage)).size();
                    i = 0;
                    if (n >= i1)
                      break;
                    if ((((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(Configure.curentPage)).get(n)).getAspkg().equals(str1)) && (((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(Configure.curentPage)).get(n)).getAspkg().equals(str2)))
                    {
                      ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(Configure.curentPage)).get(n)).setAsParentid(((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(Configure.curentPage)).get(n)).getAsid());
                      ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(Configure.curentPage)).get(n)).setAsFolderName("��欢澶�);
                      ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(Configure.curentPage)).get(n)).setAsIsFolder(1);
                      ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(Configure.curentPage)).get(n)).setContents(((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).getContents());
                      MainActivity.this.setDeskicon(Configure.curentPage, n);
                      ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).setAsFolderName("");
                      ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).setAsParentid(0);
                      ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).setAsIsFolder(0);
                      ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist)).clearAll();
                      MainActivity.dragDialogPosition = -1;
                      MainActivity.this.dbHelper.changeToNoFolder((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(Configure.curentPage)).get(n), (AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(MainActivity.currenfoldergv)).get(MainActivity.currenfolderlist));
                      i = 0;
                      break;
                    }
                  }
                }
                MainActivity.this.setDeskicon(MainActivity.currenfoldergv, MainActivity.currenfolderlist);
                int j = 0;
                int k = 0;
                if (k < MainActivity.this.lists.size());
                for (int m = 0; ; m++)
                {
                  if (m >= ((ArrayList)MainActivity.this.lists.get(k)).size());
                  while (true)
                  {
                    if (j != 0)
                      break label1807;
                    k++;
                    break label1503;
                    break;
                    if ((!localAutoSoftInfo.getAspkg().equals(((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(k)).get(m)).getAspkg())) || (!localAutoSoftInfo.getActivityName().equals(((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(k)).get(m)).getActivityName())))
                      break label1809;
                    i = k;
                    ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(k)).get(m)).setAsParentid(0);
                    ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(k)).get(m)).setAsFolderName("");
                    ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(k)).get(m)).setAsIsFolder(0);
                    ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(k)).get(m)).clearAll();
                    ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(k)).get(m)).setAsIsChanged(1);
                    MainActivity.dragDialogPosition = -1;
                    MainActivity.this.dbHelper.changeToNoFolder((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(k)).get(m));
                    j = 1;
                  }
                  break;
                }
                ((DateAdapter)((DragGrid)MainActivity.this.gridviews.get(Configure.curentPage)).getAdapter()).notifyDataSetChanged();
                ((DateAdapter)((DragGrid)MainActivity.this.gridviews.get(i)).getAdapter()).notifyDataSetChanged();
              }
              while ((Configure.curentPage != 0) && (i != 0));
          }
        });
        this.dialog.show();
        return;
        localArrayList1 = new DBHelper(this).getAutoSoftInfo("1", -1, paramInt, 0);
        ArrayList localArrayList2 = null;
        if (paramInt <= 8)
          localArrayList2 = this.dbHelper.getYuZhiSofts(paramInt);
        if ((localArrayList2 != null) && (localArrayList2.size() > 0))
          localArrayList1.addAll(localArrayList2);
      }
    }
    catch (Exception localException)
    {
      while (true)
        localException.printStackTrace();
    }
  }

  private void findNewSmsCount()
  {
    Cursor localCursor = null;
    try
    {
      localCursor = getApplicationContext().getContentResolver().query(Uri.parse("content://sms"), null, "type = 1 and read = 0", null, null);
      if (localCursor != null)
        this.newSmsCount = localCursor.getCount();
      return;
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
      return;
    }
    finally
    {
      localCursor.close();
    }
  }

  private void findView()
  {
    this.mLinearMain = ((LinearLayout)findViewById(2131493212));
  }

  private void getSoftList()
  {
    this.gridviews = new ArrayList();
    Configure.init(this);
    iniData();
    showPage();
    this.sl.setToScreen(0);
  }

  private View getWeatherView()
  {
    View localView = getLayoutInflater().inflate(2130903234, null);
    this.hourLeft = ((TextView)localView.findViewById(2131493644));
    this.minuteLeft = ((TextView)localView.findViewById(2131493645));
    this.date = ((TextView)localView.findViewById(2131493649));
    this.mTvWidgetMainWeather = ((TextView)localView.findViewById(2131493647));
    this.mTvWidgetMainCityname = ((TextView)localView.findViewById(2131493648));
    this.mTvWidgetMainDate = ((TextView)localView.findViewById(2131493649));
    this.mTvWidgetMainScopre = ((TextView)localView.findViewById(2131493650));
    this.mIvWidgetMainWeather = ((ImageView)localView.findViewById(2131493652));
    this.mTvWidgetMainLoading = ((TextView)localView.findViewById(2131493651));
    return localView;
  }

  private AutoSoftInfo getWeizhiFromList(String paramString)
  {
    AutoSoftInfo localAutoSoftInfo = null;
    int i = 0;
    int j = 0;
    if (j >= this.lists.size())
      label19: return localAutoSoftInfo;
    label108: label110: for (int k = 0; ; k++)
    {
      if (k >= ((ArrayList)this.lists.get(j)).size());
      while (true)
      {
        if (i != 0)
          break label108;
        j++;
        break;
        if (!paramString.equals(((AutoSoftInfo)((ArrayList)this.lists.get(j)).get(k)).getAspkg()))
          break label110;
        localAutoSoftInfo = (AutoSoftInfo)((ArrayList)this.lists.get(j)).get(k);
        i = 1;
      }
      break label19;
    }
  }

  private void goBindActivity()
  {
    View localView = getLayoutInflater().inflate(2130903047, null);
    final Dialog localDialog = new Dialog(this, 2131361814);
    localDialog.setContentView(localView);
    TextView localTextView1 = (TextView)localView.findViewById(2131492905);
    TextView localTextView2 = (TextView)localView.findViewById(2131492906);
    localTextView1.setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        new RqSP().setExitVal(1, MainActivity.this);
        Intent localIntent = new Intent(MainActivity.this, BindChildActivity.class);
        MainActivity.this.startActivity(localIntent);
        localDialog.dismiss();
      }
    });
    localTextView2.setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        localDialog.dismiss();
      }
    });
    localDialog.show();
  }

  private void goItemActivity(AutoSoftInfo paramAutoSoftInfo)
  {
    try
    {
      if (paramAutoSoftInfo.getAspkg().equals("com.android.stk"))
      {
        if (isSimExist())
        {
          if (paramAutoSoftInfo.getIntent() == null)
            return;
          startActivity(paramAutoSoftInfo.getIntent());
          return;
        }
        alertMessage("璇锋��ユ�������瀹��锛�);
      }
    }
    catch (ActivityNotFoundException localActivityNotFoundException)
    {
      alertMessage("搴��绋��灏��瀹���ㄤ�����轰�");
      paramAutoSoftInfo.setIsDel(1);
      paramAutoSoftInfo.setAsIsUpload(1);
      this.dbHelper.updateAuthSoftsAfterUninstall(paramAutoSoftInfo);
      refreshData();
      return;
      if (paramAutoSoftInfo.getIntent() != null)
      {
        startActivity(paramAutoSoftInfo.getIntent());
        return;
      }
    }
    catch (SecurityException localSecurityException)
    {
      alertMessage("搴��绋��灏��瀹���ㄤ�����轰�");
    }
  }

  private void iniData()
  {
    this.lstDate = new DBHelper(this).getAutoSoftInfo("1", -1, -1, 1);
    initLanguageData();
    logDebug("zhy:�╀��绘�锛� + this.lstDate.size());
  }

  private void initLanguageData()
  {
    HashMap localHashMap;
    int i;
    if (!this.locale.getLanguage().equals(this.systemLanguage))
    {
      localHashMap = new HashMap();
      localHashMap.put(Integer.valueOf(0), getString(2131428212));
      localHashMap.put(Integer.valueOf(1), getString(2131428213));
      localHashMap.put(Integer.valueOf(2), getString(2131428214));
      localHashMap.put(Integer.valueOf(3), getString(2131428215));
      localHashMap.put(Integer.valueOf(4), getString(2131428216));
      localHashMap.put(Integer.valueOf(5), getString(2131428217));
      localHashMap.put(Integer.valueOf(6), getString(2131428218));
      localHashMap.put(Integer.valueOf(7), getString(2131428219));
      localHashMap.put(Integer.valueOf(8), getString(2131428220));
      localHashMap.put(Integer.valueOf(9), getString(2131428221));
      localHashMap.put(Integer.valueOf(10), getString(2131428222));
      localHashMap.put(Integer.valueOf(11), getString(2131428223));
      localHashMap.size();
      i = 0;
      if (i < this.lstDate.size());
    }
    else
    {
      return;
    }
    String str = ((AutoSoftInfo)this.lstDate.get(i)).getAsFolderName();
    if (!str.equals(""));
    for (int j = 0; ; j++)
    {
      if (j >= this.Datas.size())
      {
        i++;
        break;
      }
      if (((String)this.Datas.get(j)).equals(str))
      {
        ((AutoSoftInfo)this.lstDate.get(i)).setAsFolderName((String)localHashMap.get(Integer.valueOf(j)));
        ((AutoSoftInfo)this.lstDate.get(i)).setAsname((String)localHashMap.get(Integer.valueOf(j)));
        ((AutoSoftInfo)this.lstDate.get(i)).setAspkg((String)localHashMap.get(Integer.valueOf(j)));
      }
    }
  }

  private boolean isSimExist()
  {
    this.mTelephonyManager = ((TelephonyManager)getSystemService("phone"));
    int i = this.mTelephonyManager.getSimState();
    return (i != 1) && (i != 0);
  }

  private void runMyService(Context paramContext)
  {
    if (WebTimeControlService.ut != -2L)
      WebTimeControlService.ut = 0L;
    Global.startWebTimeControlService(paramContext);
  }

  private void setDeskicon(int paramInt1, int paramInt2)
  {
    ((AutoSoftInfo)((ArrayList)this.lists.get(paramInt1)).get(paramInt2)).setDeskicon(ShowShortcutUtils.getFolderIcon(getResources(), (AutoSoftInfo)((ArrayList)this.lists.get(paramInt1)).get(paramInt2)));
  }

  private void setView()
  {
    String str = getSharedPreferences("wallpaper", 0).getString("wallpaperValue", null);
    if ((str != null) && (!str.equals(this.wallpaperValue)))
    {
      if ((this.wallpaperValue != null) && (!"".equals(this.wallpaperValue)))
      {
        File localFile2 = new File(this.wallpaperValue);
        if ((localFile2 != null) && (localFile2.exists()))
          localFile2.delete();
      }
      File localFile1 = new File(str);
      if ((localFile1 != null) && (localFile1.exists()))
      {
        this.mLinearMain.setBackgroundDrawable(new BitmapDrawable(BitmapFactory.decodeFile(str)));
        this.wallpaperValue = str;
      }
    }
  }

  private void setWallpaper()
  {
    findView();
    setView();
  }

  private void updateWeathImg(String paramString)
  {
    Drawable localDrawable = getResources().getDrawable(2130838105);
    if (paramString.contains("��))
      localDrawable = getResources().getDrawable(2130838096);
    if (paramString.contains("��))
      localDrawable = getResources().getDrawable(2130838110);
    if (paramString.contains("澶��"))
      localDrawable = getResources().getDrawable(2130838103);
    if (paramString.contains("��))
      localDrawable = getResources().getDrawable(2130838095);
    if (paramString.contains("澶ч�"))
      localDrawable = getResources().getDrawable(2130838102);
    if (paramString.contains("姣����))
      localDrawable = getResources().getDrawable(2130838097);
    if (paramString.contains("��))
      localDrawable = getResources().getDrawable(2130838100);
    if (paramString.contains("��))
      localDrawable = getResources().getDrawable(2130838108);
    this.mIvWidgetMainWeather.setBackgroundDrawable(localDrawable);
  }

  private void updateWeather()
  {
    SharedPreferences localSharedPreferences = getSharedPreferences("weather", 0);
    String str1 = localSharedPreferences.getString("lastUpdateDate", "");
    String str2 = localSharedPreferences.getString("weatherStatus", "");
    if (Global.updateWeather)
    {
      this.mTvWidgetMainWeather.setText(str2);
      this.mTvWidgetMainCityname.setText(localSharedPreferences.getString("cityname", ""));
      String str4 = localSharedPreferences.getString("temHigh", "") + "/" + localSharedPreferences.getString("temLow", "");
      this.mTvWidgetMainScopre.setText(str4);
      updateWeathImg(str2);
      this.mTvWidgetMainLoading.setVisibility(8);
    }
    while (true)
    {
      return;
      if ((str1 != null) && (!"".equals(str1)))
        try
        {
          if (this.simpleDateFormatDate.format(this.simpleDateFormat.parse(str1)).equals(this.simpleDateFormatDate.format(new Date())))
          {
            System.out.println("weatherState----->" + str2);
            this.mTvWidgetMainWeather.setText(str2);
            this.mTvWidgetMainCityname.setText(localSharedPreferences.getString("cityname", ""));
            String str3 = localSharedPreferences.getString("temHigh", "") + "/" + localSharedPreferences.getString("temLow", "");
            this.mTvWidgetMainScopre.setText(str3);
            updateWeathImg(str2);
            this.mTvWidgetMainLoading.setVisibility(8);
            return;
          }
        }
        catch (ParseException localParseException)
        {
          localParseException.printStackTrace();
          return;
        }
    }
    this.mTvWidgetMainWeather.setText(null);
    this.mTvWidgetMainCityname.setText(null);
    this.mTvWidgetMainScopre.setText(null);
    this.mIvWidgetMainWeather.setBackgroundDrawable(null);
    this.mTvWidgetMainLoading.setVisibility(0);
  }

  private Dialog wallpaperDialog(Context paramContext)
  {
    View localView = getLayoutInflater().inflate(2130903092, null);
    final Dialog localDialog = new Dialog(paramContext, 2131361814);
    localDialog.setContentView(localView);
    TextView localTextView = (TextView)localView.findViewById(2131493094);
    RadioButton localRadioButton1 = (RadioButton)localView.findViewById(2131493092);
    RadioButton localRadioButton2 = (RadioButton)localView.findViewById(2131493093);
    localRadioButton1.setChecked(true);
    localRadioButton1.setOnClickListener(this);
    localRadioButton2.setOnClickListener(this);
    localTextView.setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        localDialog.dismiss();
      }
    });
    return localDialog;
  }

  public LinearLayout addDialogGridView(final ArrayList<AutoSoftInfo> paramArrayList, int paramInt, Dialog paramDialog)
  {
    ArrayList localArrayList = new ArrayList();
    LinearLayout localLinearLayout = new LinearLayout(this);
    try
    {
      DialogDragGrid localDialogDragGrid = new DialogDragGrid(this, this.numColumns, paramDialog, paramInt);
      localDialogDragGrid.setAdapter(new DialogDateAdapter(this, paramArrayList, this.dbHelper));
      localDialogDragGrid.setNumColumns(4);
      localDialogDragGrid.setHorizontalSpacing(0);
      localDialogDragGrid.setVerticalSpacing(getResources().getDimensionPixelOffset(2131296270));
      if (paramInt != 0)
      {
        localDialogDragGrid.setOnItemClickListener(new AdapterView.OnItemClickListener()
        {
          public void onItemClick(AdapterView<?> paramAnonymousAdapterView, View paramAnonymousView, int paramAnonymousInt, long paramAnonymousLong)
          {
            if (((AutoSoftInfo)paramArrayList.get(paramAnonymousInt)).getActivityName() == null)
            {
              Intent localIntent = MainActivity.this.getPackageManager().getLaunchIntentForPackage(((AutoSoftInfo)paramArrayList.get(paramAnonymousInt)).getAspkg());
              if (localIntent == null)
              {
                ProgressBar localProgressBar = (ProgressBar)paramAnonymousView.findViewById(2131493072);
                APKDownloadTask localAPKDownloadTask = new APKDownloadTask();
                localAPKDownloadTask.setContext(MainActivity.this.getApplicationContext());
                localAPKDownloadTask.setApkpath(((AutoSoftInfo)paramArrayList.get(paramAnonymousInt)).getAddownloadurl());
                localAPKDownloadTask.setProgressBar(localProgressBar);
                localAPKDownloadTask.execute(null);
                new DBHelper(MainActivity.this).insertSoftsMarket(((AutoSoftInfo)paramArrayList.get(paramAnonymousInt)).getAspkg());
                return;
              }
              localIntent.setAction("android.intent.action.MAIN");
              localIntent.addFlags(270532608);
              MainActivity.this.startActivity(localIntent);
              return;
            }
            MainActivity.this.goItemActivity((AutoSoftInfo)paramArrayList.get(paramAnonymousInt));
          }
        });
        localDialogDragGrid.setSelector(2130968582);
        localDialogDragGrid.setPageListener(new DialogDragGrid.G_PageListener()
        {
          public void page(int paramAnonymousInt1, int paramAnonymousInt2)
          {
            switch (paramAnonymousInt1)
            {
            case 1:
            case 4:
            default:
              return;
            case 0:
              MainActivity.this.sl.snapToScreen(paramAnonymousInt2);
              MainActivity.this.setCurPage(paramAnonymousInt2);
              new Handler().postDelayed(new Runnable()
              {
                public void run()
                {
                  DialogConfigure.isChangingPage = false;
                }
              }
              , 800L);
              return;
            case 2:
              Configure.isDelDark = true;
              return;
            case 3:
              Configure.isDelDark = false;
              return;
            case 5:
            }
            MainActivity.this.delGVItem(Configure.removeItem);
            MainActivity.isSoftMoving = 0;
          }
        });
        localDialogDragGrid.setOnItemChangeListener(new DialogDragGrid.G_ItemChangeListener()
        {
          public void change(int paramAnonymousInt1, int paramAnonymousInt2, int paramAnonymousInt3)
          {
          }
        });
      }
      localArrayList.add(localDialogDragGrid);
      localLinearLayout.addView((View)localArrayList.get(0), this.param);
      return localLinearLayout;
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
    return localLinearLayout;
  }

  public LinearLayout addGridView(final int paramInt1, int paramInt2)
  {
    int i = (int)(0.7D * this.screenHeight / this.numRows);
    LinearLayout localLinearLayout = new LinearLayout(this);
    localLinearLayout.setOrientation(1);
    localLinearLayout.setGravity(1);
    try
    {
      this.gridView = new DragGrid(this, this.numColumns);
      this.gridView.setAdapter(new DateAdapter(this, (ArrayList)this.lists.get(paramInt1), paramInt2, this.dbHelper, i));
      this.gridView.setNumColumns(this.numColumns);
      this.gridView.setHorizontalSpacing(0);
      this.gridView.setVerticalSpacing(0);
      this.gridView.setOnItemClickListener(new AdapterView.OnItemClickListener()
      {
        public void onItemClick(AdapterView<?> paramAnonymousAdapterView, View paramAnonymousView, int paramAnonymousInt, long paramAnonymousLong)
        {
          MainActivity.currenfoldergv = paramInt1;
          MainActivity.currenfolderlist = paramAnonymousInt;
          AutoSoftInfo localAutoSoftInfo = (AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(paramInt1)).get(paramAnonymousInt);
          if ((localAutoSoftInfo.getAsParentid() != 0) && (localAutoSoftInfo.getAsid() != localAutoSoftInfo.getAsParentid()))
            localAutoSoftInfo.getAsParentid();
          if (((ArrayList)MainActivity.this.lists.get(paramInt1)).get(paramAnonymousInt) != null)
          {
            if (paramAnonymousInt + paramInt1 * MainActivity.this.PAGE_SIZE != 0)
              break label173;
            if (MainActivity.this.isbind != 1)
              break label165;
            if (!MainActivity.this.CheckNetwork())
              break label151;
            Intent localIntent3 = new Intent(MainActivity.this, MarketTabForChildActivity.class);
            MainActivity.this.startActivity(localIntent3);
          }
          label151: label165: label173: 
          do
          {
            return;
            Toast.makeText(MainActivity.this, "����舵�涓�����浣�, 0).show();
            return;
            MainActivity.this.goBindActivity();
            return;
            if (paramAnonymousInt + paramInt1 * MainActivity.this.PAGE_SIZE == 1)
            {
              if (MainActivity.this.isbind == 1)
              {
                MainActivity.this.dialogFolder(MainActivity.this, 0);
                return;
              }
              MainActivity.this.goBindActivity();
              return;
            }
            if (paramAnonymousInt + paramInt1 * MainActivity.this.PAGE_SIZE == 2)
            {
              if (MainActivity.this.isbind == 1)
              {
                Intent localIntent2 = new Intent(MainActivity.this, SyncTutorialActivity.class);
                MainActivity.this.startActivity(localIntent2);
                return;
              }
              MainActivity.this.goBindActivity();
              return;
            }
            if (paramAnonymousInt + paramInt1 * MainActivity.this.PAGE_SIZE == 3)
            {
              if (MainActivity.this.isbind == 1)
              {
                Intent localIntent1 = new Intent(MainActivity.this, WinInTestActivity.class);
                MainActivity.this.startActivity(localIntent1);
                return;
              }
              MainActivity.this.goBindActivity();
              return;
            }
            if (localAutoSoftInfo.getAsIsFolder() == 1)
            {
              if (paramAnonymousInt + paramInt1 * MainActivity.this.PAGE_SIZE <= 7)
              {
                if (MainActivity.this.isbind == 1)
                {
                  if (MainActivity.this.share.getInt("isupdateyuzhi", 0) == 0)
                  {
                    MainActivity.FoldSoftTask localFoldSoftTask = new MainActivity.FoldSoftTask(MainActivity.this);
                    localFoldSoftTask.setId(localAutoSoftInfo.getAsid());
                    localFoldSoftTask.execute(new String[] { "installindex" });
                    MainActivity.this.addOperation(localFoldSoftTask);
                    return;
                  }
                  MainActivity.this.dialogFolder(MainActivity.this, localAutoSoftInfo.getAsid());
                  return;
                }
                MainActivity.this.goBindActivity();
                return;
              }
              MainActivity.this.dialogFolder(MainActivity.this, localAutoSoftInfo.getAsid());
              return;
            }
          }
          while (paramAnonymousInt + paramInt1 * MainActivity.this.PAGE_SIZE <= 3);
          if (localAutoSoftInfo.getAsIsNew() == 1)
          {
            ((AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(paramInt1)).get(paramAnonymousInt)).setAsIsNew(0);
            MainActivity.this.dbHelper.updateSoftNews(localAutoSoftInfo.getAsid());
            ((DateAdapter)((DragGrid)MainActivity.this.gridviews.get(Configure.curentPage)).getAdapter()).notifyDataSetChanged();
            if (Configure.curentPage == 0)
              MainActivity.isRefreshMarket = Boolean.valueOf(false);
          }
          MainActivity.this.goItemActivity(localAutoSoftInfo);
        }
      });
      this.gridView.setSelector(new ColorDrawable(0));
      this.gridView.setCacheColorHint(0);
      this.gridView.setPageListener(new DragGrid.G_PageListener()
      {
        public void page(int paramAnonymousInt1, int paramAnonymousInt2)
        {
          switch (paramAnonymousInt1)
          {
          case 1:
          case 2:
          case 3:
          case 4:
          default:
          case 0:
          case 5:
          }
          do
          {
            return;
            MainActivity.this.sl.snapToScreen(paramAnonymousInt2);
            MainActivity.this.setCurPage(paramAnonymousInt2);
            new Handler().postDelayed(new Runnable()
            {
              public void run()
              {
                Configure.isChangingPage = false;
              }
            }
            , 800L);
            return;
            MainActivity.this.delGVItem(Configure.removeItem);
            MainActivity.isSoftMoving = 0;
          }
          while (Configure.curentPage != 0);
          MainActivity.isRefreshMarket = Boolean.valueOf(false);
        }
      });
      this.gridView.setOnItemChangeListener(new DragGrid.G_ItemChangeListener()
      {
        public void change(int paramAnonymousInt1, int paramAnonymousInt2, int paramAnonymousInt3)
        {
          if (((Configure.curentPage == 0) && (paramAnonymousInt2 == 0)) || ((Configure.curentPage == 0) && (paramAnonymousInt2 == 1)))
          {
            ((DateAdapter)((DragGrid)MainActivity.this.gridviews.get(Configure.curentPage - paramAnonymousInt3)).getAdapter()).notifyDataSetChanged();
            if (Configure.curentPage == 0)
              MainActivity.isRefreshMarket = Boolean.valueOf(false);
            MainActivity.isSoftMoving = 0;
            return;
          }
          if ((((ArrayList)MainActivity.this.lists.get(Configure.curentPage)).size() <= paramAnonymousInt2) || (paramAnonymousInt2 == -1))
          {
            ((DateAdapter)((DragGrid)MainActivity.this.gridviews.get(Configure.curentPage - paramAnonymousInt3)).getAdapter()).notifyDataSetChanged();
            if (Configure.curentPage == 0)
              MainActivity.isRefreshMarket = Boolean.valueOf(false);
            MainActivity.isSoftMoving = 0;
            return;
          }
          AutoSoftInfo localAutoSoftInfo1 = (AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(Configure.curentPage)).get(paramAnonymousInt2);
          AutoSoftInfo localAutoSoftInfo2 = (AutoSoftInfo)((ArrayList)MainActivity.this.lists.get(Configure.curentPage - paramAnonymousInt3)).get(paramAnonymousInt1);
          if (localAutoSoftInfo1.getAsIsFolder() == 0)
          {
            int i = localAutoSoftInfo2.getAsid();
            if (localAutoSoftInfo1.getAsParentid() == localAutoSoftInfo2.getAsid())
              localAutoSoftInfo1.setAsParentid(localAutoSoftInfo1.getAsid());
            localAutoSoftInfo2.setAsid(localAutoSoftInfo1.getAsid());
            if (localAutoSoftInfo2.getAsIsFolder() == 1)
            {
              localAutoSoftInfo2.setAsParentid(localAutoSoftInfo1.getAsid());
              MainActivity.this.changeParentid(localAutoSoftInfo2.getAsParentid(), localAutoSoftInfo2.getContents());
            }
            localAutoSoftInfo1.setAsid(i);
            ((ArrayList)MainActivity.this.lists.get(Configure.curentPage - paramAnonymousInt3)).add(paramAnonymousInt1, localAutoSoftInfo1);
            ((ArrayList)MainActivity.this.lists.get(Configure.curentPage - paramAnonymousInt3)).remove(paramAnonymousInt1 + 1);
            ((ArrayList)MainActivity.this.lists.get(Configure.curentPage)).add(paramAnonymousInt2, localAutoSoftInfo2);
            ((ArrayList)MainActivity.this.lists.get(Configure.curentPage)).remove(paramAnonymousInt2 + 1);
            MainActivity.this.dbHelper.changeOrder(localAutoSoftInfo2, localAutoSoftInfo1);
          }
          while (true)
          {
            ((DateAdapter)((DragGrid)MainActivity.this.gridviews.get(Configure.curentPage - paramAnonymousInt3)).getAdapter()).notifyDataSetChanged();
            ((DateAdapter)((DragGrid)MainActivity.this.gridviews.get(Configure.curentPage)).getAdapter()).notifyDataSetChanged();
            if ((Configure.curentPage != 0) && (Configure.curentPage - paramAnonymousInt3 != 0))
              break;
            MainActivity.isRefreshMarket = Boolean.valueOf(false);
            break;
            if (localAutoSoftInfo2.getAsIsFolder() == 1)
              continue;
            PackageManager localPackageManager = MainActivity.this.getPackageManager();
            try
            {
              localPackageManager.getApplicationInfo(localAutoSoftInfo2.getAspkg(), 8192);
              localAutoSoftInfo1.add(new ShortcutInfo(localPackageManager.getActivityIcon(new ComponentName(localAutoSoftInfo2.getAspkg(), localAutoSoftInfo2.getActivityName())), localAutoSoftInfo2.getAspkg(), localAutoSoftInfo2.getActivityName()));
              ShowShortcutUtils.updateFolderIcon(MainActivity.this.getResources(), localAutoSoftInfo1);
              localAutoSoftInfo2.setAsParentid(localAutoSoftInfo1.getAsid());
              ((ArrayList)MainActivity.this.lists.get(Configure.curentPage - paramAnonymousInt3)).add(paramAnonymousInt1, localAutoSoftInfo2);
              ((ArrayList)MainActivity.this.lists.get(Configure.curentPage - paramAnonymousInt3)).remove(paramAnonymousInt1 + 1);
              MainActivity.this.dbHelper.updateParentid(localAutoSoftInfo2.getAsid(), localAutoSoftInfo2.getAsParentid());
            }
            catch (PackageManager.NameNotFoundException localNameNotFoundException)
            {
              while (true)
                localNameNotFoundException.printStackTrace();
            }
          }
        }
      });
      this.gridviews.add(this.gridView);
      if (paramInt2 == 0)
      {
        if (this.vWeather.getParent() != null)
          ((LinearLayout)this.vWeather.getParent()).removeView(this.vWeather);
        LinearLayout.LayoutParams localLayoutParams1 = new LinearLayout.LayoutParams(-1, i * 2);
        localLinearLayout.addView(this.vWeather, localLayoutParams1);
        if (this.screenHeight >= 960)
        {
          LinearLayout.LayoutParams localLayoutParams2 = new LinearLayout.LayoutParams(-1, -1);
          localLayoutParams2.topMargin = 20;
          localLinearLayout.addView((View)this.gridviews.get(paramInt1), localLayoutParams2);
          return localLinearLayout;
        }
        localLinearLayout.addView((View)this.gridviews.get(paramInt1), this.param);
        return localLinearLayout;
      }
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
      return localLinearLayout;
    }
    localLinearLayout.addView((View)this.gridviews.get(paramInt1), this.param);
    return localLinearLayout;
  }

  public void init()
    throws Exception
  {
    this.vWeather = getWeatherView();
    this.gridviews = new ArrayList();
    this.packageManager = getPackageManager();
    this.phone = ((RadioButton)findViewById(2131493219));
    this.msg = ((RadioButton)findViewById(2131493221));
    this.camera = ((RadioButton)findViewById(2131493223));
    this.setting = ((RadioButton)findViewById(2131493224));
    this.no_telephone = ((TextView)findViewById(2131493220));
    this.no_sms = ((TextView)findViewById(2131493222));
    this.locale = getResources().getConfiguration().locale;
    this.phone.setOnClickListener(this);
    this.msg.setOnClickListener(this);
    this.camera.setOnClickListener(this);
    this.setting.setOnClickListener(this);
    this.dbHelper = new DBHelper(this);
    runMyService(this);
    StatusProtect.Show(getApplicationContext());
    this.rgPage = ((RadioGroup)findViewById(2131493213));
    this.wm = ((WindowManager)getSystemService("window"));
    this.sl = ((ScrollLayout)findViewById(2131493216));
    this.sl.setPageListener(new ScrollLayout.PageListener()
    {
      public void page(int paramAnonymousInt)
      {
        MainActivity.this.setCurPage(paramAnonymousInt);
      }
    });
    Configure.init(this);
    this.param = new LinearLayout.LayoutParams(-1, -1);
    this.param.rightMargin = 10;
    this.param.leftMargin = 10;
    if (this.gridView != null)
      this.sl.removeAllViews();
    runAnimation();
    this.Datas = new ArrayList();
    this.Datas.add("��欢澶�);
    this.Datas.add("浜��缃����);
    this.Datas.add("瀹��宸ュ�");
    this.Datas.add("�典俊涓��");
    this.Datas.add("�辫��ㄩ」");
    this.Datas.add("瀛��宸ュ�");
    this.Datas.add("�扮���ぇ��);
    this.Datas.add("璇���ヨ�");
    this.Datas.add("璧㈠�涓����);
    this.Datas.add("������");
    this.Datas.add("寰����);
    this.Datas.add("搴��甯��");
  }

  public void isFristLogin()
  {
    Intent localIntent = new Intent("android.intent.action.MAIN");
    localIntent.setFlags(268435456);
    localIntent.addCategory("android.intent.category.HOME");
    startActivity(localIntent);
  }

  protected void onActivityResult(int paramInt1, int paramInt2, Intent paramIntent)
  {
    super.onActivityResult(paramInt1, paramInt2, paramIntent);
    if (paramInt2 != -1);
    Uri localUri;
    do
    {
      return;
      if (paramInt1 == 8)
      {
        Cursor localCursor = managedQuery(paramIntent.getData(), new String[] { "_data", "_size" }, null, null, null);
        int i = localCursor.getColumnIndexOrThrow("_data");
        localCursor.moveToFirst();
        localCursor.getString(i);
        Intent localIntent = new Intent(this, CropActivity.class);
        localIntent.putExtra("wallpaperType", "phoneAlbum");
        localIntent.putExtra("wallpaperValue", paramIntent.getData());
        startActivity(localIntent);
        return;
      }
      localUri = (Uri)paramIntent.getParcelableExtra("android.intent.extra.ringtone.PICKED_URI");
    }
    while (localUri == null);
    switch (paramInt1)
    {
    default:
      return;
    case 0:
      RingtoneManager.setActualDefaultRingtoneUri(this, 1, localUri);
      return;
    case 1:
    }
    RingtoneManager.setActualDefaultRingtoneUri(this, 2, localUri);
  }

  public void onAttachedToWindow()
  {
    if (!FilterSoft.IsCustomVersion())
      getWindow().setType(2004);
    super.onAttachedToWindow();
  }

  public void onClick(View paramView)
  {
    switch (paramView.getId())
    {
    default:
      return;
    case 2131493219:
      startActivity(new Intent("android.intent.action.DIAL"));
      return;
    case 2131493221:
      new Intent();
      startActivity(this.packageManager.getLaunchIntentForPackage("com.android.mms"));
      return;
    case 2131493223:
      while (true)
      {
        try
        {
          if (Build.MODEL.contains("XT882"))
          {
            Intent localIntent1 = new Intent("android.intent.action.MAIN");
            localIntent1.setFlags(268435456);
            localIntent1.setComponent(new ComponentName("com.motorola.Camera", "com.motorola.Camera.Camera"));
            startActivity(localIntent1);
          }
          if (Build.MODEL.contains("HUAWEI"))
          {
            PackageManager localPackageManager = getPackageManager();
            new Intent("android.intent.action.MAIN").setFlags(268435456);
            startActivity(localPackageManager.getLaunchIntentForPackage("com.android.hwcamera"));
            if (!Build.MODEL.contains("HTC"))
              break;
            Intent localIntent3 = new Intent("android.intent.action.MAIN");
            localIntent3.setFlags(268435456);
            localIntent3.setComponent(new ComponentName("com.android.camera", "com.android.camera.CameraEntry"));
            startActivity(localIntent3);
            return;
          }
        }
        catch (Exception localException)
        {
          localException.printStackTrace();
          return;
        }
        if (Build.MODEL.contains("Samsung"))
        {
          Intent localIntent2 = new Intent("android.intent.action.MAIN");
          localIntent2.setFlags(268435456);
          localIntent2.setComponent(new ComponentName("com.sec.android.app.camera", "com.sec.android.app.camera.Camera"));
          startActivity(localIntent2);
        }
      }
      Intent localIntent4 = new Intent("android.intent.action.MAIN");
      localIntent4.setFlags(268435456);
      localIntent4.setComponent(new ComponentName("com.android.camera", "com.android.camera.Camera"));
      startActivity(localIntent4);
      return;
    case 2131493224:
      startActivity(new Intent(this, SettingsActivity.class));
      return;
    case 2131493092:
      startActivity(new Intent(this, WallpaperListActivity.class));
      dismissDialog(7);
      return;
    case 2131493093:
    }
    startActivityForResult(new Intent("android.intent.action.PICK", MediaStore.Images.Media.EXTERNAL_CONTENT_URI), 8);
    dismissDialog(7);
  }

  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    setContentView(2130903136);//main.xml
    isSoftMoving = 0;
    this.dm = new DisplayMetrics();
    getWindowManager().getDefaultDisplay().getMetrics(this.dm);
    this.screenHeight = this.dm.heightPixels;
    App.initMainContext(this);
    try
    {
      Intent localIntent = new Intent("send.ok.message");
      localIntent.putExtra("exitval", 0);
      sendBroadcast(localIntent);
      init();
      registerBoradcastReceiver();
      this.share = getSharedPreferences("sys", 0);
      int i = this.share.getInt("isfirst", -1);
      Boolean localBoolean = this.dbHelper.checkIsHavaSoft();
      logInfo("ishave:" + localBoolean);
      SharedPreferences.Editor localEditor = this.share.edit();
      if (!localBoolean.booleanValue())
      {
        this.systemLanguage = this.locale.getLanguage();
        localEditor.putInt("isfirst", -1);
        localEditor.putInt("isupdateyuzhi", 0);
        localEditor.putInt("isupload", 0);
        localEditor.commit();
        new AuthSoftsServer(this).initFirstSoft();
        SyncTutorialActivity.initBookSubjectBeanList(this, this.dbHelper);
        localEditor.putInt("isfirst", 1);
        localEditor.commit();
      }
      while (true)
      {
        new DataTask().execute(new String[] { "installindex" });
        new SetWallpaper().execute(new String[] { "FIRST" });
        startService(new Intent(this, WeatherService.class));
        return;
        if (i == -1)
        {
          this.systemLanguage = this.locale.getLanguage();
          new AuthSoftsServer(this).initFirstSoft();
          localEditor.putInt("isfirst", 1);
          localEditor.putInt("isupload", 0);
          localEditor.commit();
        }
      }
    }
    catch (Exception localException)
    {
      while (true)
        localException.printStackTrace();
    }
  }

  protected Dialog onCreateDialog(int paramInt)
  {
    switch (paramInt)
    {
    default:
      return null;
    case 7:
    }
    return wallpaperDialog(this);
  }

  public boolean onCreateOptionsMenu(Menu paramMenu)
  {
    super.onCreateOptionsMenu(paramMenu);
    paramMenu.add(0, 2, 2, "搴��绋��").setIcon(2130837755);
    paramMenu.add(0, 3, 5, "澹�焊").setIcon(17301587);
    paramMenu.add(0, 4, 6, "璁剧疆").setIcon(17301577);
    return true;
  }

  public void onDestroy()
  {
    super.onDestroy();
    try
    {
      unregisterReceiver(this.mBroadcastReceiver);
      label12: int i = this.share.getInt("isupload", 0);
      logInfo("lin5 MainActivity Is Destroy:" + i);
      if ((i == 0) && (new RqSP().getExitVal(this) == 0))
      {
        Intent localIntent = new Intent(this, MainActivity.class);
        localIntent.setFlags(268435456);
        startActivity(localIntent);
      }
      return;
    }
    catch (Exception localException)
    {
      break label12;
    }
  }

  public boolean onKeyDown(int paramInt, KeyEvent paramKeyEvent)
  {
    boolean bool = true;
    if (!FilterSoft.IsCustomVersion());
    switch (paramInt)
    {
    default:
      bool = super.onKeyDown(paramInt, paramKeyEvent);
    case 4:
    case 82:
    }
    return bool;
  }

  public boolean onOptionsItemSelected(MenuItem paramMenuItem)
  {
    switch (paramMenuItem.getItemId())
    {
    default:
    case 2:
    case 3:
    case 4:
    }
    while (true)
    {
      return false;
      startActivity(new Intent("android.settings.APPLICATION_SETTINGS"));
      continue;
      showDialog(7);
      continue;
      IntentActivity(this, SettingsActivity.class);
    }
  }

  protected void onPause()
  {
    super.onPause();
    logInfo("lin5 MainActivity Is Pause");
  }

  public boolean onPrepareOptionsMenu(Menu paramMenu)
  {
    super.onPrepareOptionsMenu(paramMenu);
    return true;
  }

  protected void onResume()
  {
    try
    {
      super.onResume();
      logDebug("main onresume");
      logInfo("lin5 MainActivity OnResume");
      this.rp = new RqSP();
      this.rp.setExitVal(0, this);
      this.isbind = this.rp.getIsBind(this);
      Global.isBinded = this.isbind;
      if (this.isRefresh.booleanValue())
      {
        logDebug("isRefresh true");
        refreshData();
      }
      if ((isRefreshMarket.booleanValue()) && (Configure.curentPage == 0))
      {
        isRefreshMarket = Boolean.valueOf(false);
        ((DateAdapter)((DragGrid)this.gridviews.get(Configure.curentPage)).getAdapter()).notifyDataSetChanged();
      }
      this.no_telephone.setVisibility(0);
      this.no_sms.setVisibility(0);
      findNewSmsCount();
      this.no_telephone.setText(this.newCallCount);
      this.no_sms.setText(this.newSmsCount);
      if (this.newCallCount.equals("0"))
        this.no_telephone.setVisibility(4);
      if (this.newSmsCount.equals("0"))
        this.no_sms.setVisibility(4);
      getContentResolver().registerContentObserver(CallLog.Calls.CONTENT_URI, false, new MissedCallContentObserver(this, new Handler()));
      new SetWallpaper().execute(new String[] { "BACK" });
      return;
    }
    catch (Exception localException)
    {
      while (true)
        localException.printStackTrace();
    }
  }

  protected void onStop()
  {
    super.onStop();
    logInfo("lin5 MainActivity Is Stop");
  }

  public void refreshData()
  {
    this.rgPage.removeAllViews();
    this.sl.removeAllViews();
    this.isRefresh = Boolean.valueOf(false);
    getSoftList();
  }

  public void registerBoradcastReceiver()
  {
    IntentFilter localIntentFilter = new IntentFilter();
    localIntentFilter.addAction("refreshData");
    localIntentFilter.addAction("refreshMarket");
    localIntentFilter.addAction("refreshTime");
    localIntentFilter.addAction("refreshDate");
    localIntentFilter.addAction("refreshWeather");
    registerReceiver(this.mBroadcastReceiver, localIntentFilter);
  }

  public void runAnimation()
  {
    this.down = AnimationUtils.loadAnimation(this, 2130968578);
    this.up = AnimationUtils.loadAnimation(this, 2130968579);
    this.down.setAnimationListener(new Animation.AnimationListener()
    {
      public void onAnimationEnd(Animation paramAnonymousAnimation)
      {
      }

      public void onAnimationRepeat(Animation paramAnonymousAnimation)
      {
      }

      public void onAnimationStart(Animation paramAnonymousAnimation)
      {
      }
    });
    this.right = new TranslateAnimation(2, 0.0F, 2, -1.0F, 2, 0.0F, 2, 0.0F);
    this.left = new TranslateAnimation(2, -1.0F, 2, 0.0F, 2, 0.0F, 2, 0.0F);
    this.right.setDuration(25000L);
    this.left.setDuration(25000L);
    this.right.setFillAfter(true);
    this.left.setFillAfter(true);
  }

  public void setCurPage(int paramInt)
  {
    if ((isRefreshMarket.booleanValue()) && (paramInt == 0))
    {
      isRefreshMarket = Boolean.valueOf(false);
      ((DateAdapter)((DragGrid)this.gridviews.get(Configure.curentPage)).getAdapter()).notifyDataSetChanged();
    }
    ((RadioButton)this.rgPage.getChildAt(paramInt)).setChecked(true);
  }

  public void showPage()
  {
    this.sl.setVisibility(0);
    int i1;
    if (this.wm != null)
    {
      i1 = this.wm.getDefaultDisplay().getWidth();
      logInfo("list:" + i1);
      if (i1 > 240)
        break label169;
      this.PAGE_SIZE = 12;
      this.numRows = 3;
    }
    while (true)
    {
      int i;
      int m;
      label169: int j;
      label266: int k;
      try
      {
        Configure.countPages = (int)Math.ceil((8 + this.lstDate.size()) / this.PAGE_SIZE);
        logInfo("lin4 pagecount:" + Configure.countPages);
        this.lists = new ArrayList();
        i = 0;
        if (i >= Configure.countPages)
        {
          ((RadioButton)this.rgPage.getChildAt(0)).setChecked(true);
          m = 0;
          int n = Configure.countPages;
          if (m < n)
            break label417;
          return;
          if (i1 <= 480)
            continue;
          this.PAGE_SIZE = 16;
          continue;
        }
        if (i == 0)
        {
          this.PAGE_SIZE = (-8 + this.PAGE_SIZE);
          this.lists.add(new ArrayList());
          RadioButton localRadioButton = (RadioButton)LayoutInflater.from(getApplicationContext()).inflate(2130903176, null);
          localRadioButton.setTag(Integer.valueOf(i));
          this.rgPage.addView(localRadioButton);
          j = 8 + this.PAGE_SIZE * (i - 1);
          if (8 + this.PAGE_SIZE * (-1 + (i + 1)) > this.lstDate.size())
          {
            k = this.lstDate.size();
            break label438;
          }
        }
        else
        {
          if (i != 1)
            continue;
          this.PAGE_SIZE = (8 + this.PAGE_SIZE);
          continue;
        }
      }
      catch (Exception localException)
      {
        logDebug("page ex:" + localException.getMessage());
        localException.printStackTrace();
        return;
      }
      label417: label438: 
      do
      {
        ((AutoSoftInfo)this.lstDate.get(j)).setSeatPage(i);
        ((ArrayList)this.lists.get(i)).add((AutoSoftInfo)this.lstDate.get(j));
        j++;
        break label266;
        k = 8 + this.PAGE_SIZE * (-1 + (i + 1));
        continue;
        this.sl.addView(addGridView(m, m));
        m++;
        break;
      }
      while (j < k);
      i++;
    }
  }

  class DataTask extends AsyncTask<String, Integer, String>
  {
    String param;

    DataTask()
    {
    }

    protected String doInBackground(String[] paramArrayOfString)
    {
      this.param = paramArrayOfString[0];
      MainActivity.this.iniData();
      return "";
    }

    protected void onPostExecute(String paramString)
    {
      if (MainActivity.this.pb != null)
      {
        MainActivity.this.pb.setVisibility(8);
        MainActivity.this.pb_layout.setVisibility(8);
      }
      MainActivity.this.showPage();
      MainActivity.this.setWallpaper();
      super.onPostExecute(paramString);
    }

    protected void onPreExecute()
    {
      MainActivity.this.pb = ((ProgressBar)MainActivity.this.findViewById(2131493215));
      MainActivity.this.pb_layout = ((LinearLayout)MainActivity.this.findViewById(2131493214));
      MainActivity.this.pb_layout.setVisibility(0);
      MainActivity.this.pb.setVisibility(0);
      MainActivity.this.rgPage.removeAllViews();
      super.onPreExecute();
    }
  }

  class FoldSoftTask extends AsyncTask<String, Integer, String>
  {
    private List<AutoSoftInfo> events;
    private int id;
    String param;

    FoldSoftTask()
    {
    }

    protected String doInBackground(String[] paramArrayOfString)
    {
      this.param = paramArrayOfString[0];
      if (this.param.equals("installindex"))
        this.events = new RecomSoftServer(MainActivity.this).installSoftWare(0, "30,31,32,33", "", 0, 0, 1, 20);
      return null;
    }

    public int getId()
    {
      return this.id;
    }

    protected void onPostExecute(String paramString)
    {
      if ((this.param.equals("installindex")) && (this.events != null) && (this.events.size() > 0))
      {
        SharedPreferences.Editor localEditor = MainActivity.this.share.edit();
        localEditor.putInt("isupdateyuzhi", 1);
        localEditor.commit();
        MainActivity.this.dbHelper.insertYuZhiAuthSofts(this.events);
        MainActivity.this.refreshData();
        MainActivity.this.dialogFolder(MainActivity.this, this.id);
      }
      MainActivity.this.closeProgress();
      super.onPostExecute(paramString);
    }

    protected void onPreExecute()
    {
      MainActivity.this.showProgress("");
      super.onPreExecute();
    }

    public void setId(int paramInt)
    {
      this.id = paramInt;
    }
  }

  public class MainAsyncTask extends AsyncTask<String, Integer, String>
  {
    private String method = "";

    public MainAsyncTask()
    {
    }

    protected String doInBackground(String[] paramArrayOfString)
    {
      this.method = paramArrayOfString[0];
      try
      {
        if (this.method.equals("onChange"))
        {
          Cursor localCursor = MainActivity.this.getContentResolver().query(CallLog.Calls.CONTENT_URI, new String[] { "number", "type", "new" }, "type = 3 and new = 1", null, "date DESC");
          if (localCursor != null)
            MainActivity.this.newCallCount = localCursor.getCount();
          localCursor.close();
        }
        return "";
      }
      catch (Exception localException)
      {
        while (true)
          localException.printStackTrace();
      }
    }

    protected void onPostExecute(String paramString)
    {
    }

    protected void onPreExecute()
    {
    }
  }

  public class MissedCallContentObserver extends ContentObserver
  {
    public MissedCallContentObserver(Context paramHandler, Handler arg3)
    {
      super();
    }

    public boolean deliverSelfNotifications()
    {
      return super.deliverSelfNotifications();
    }

    public void onChange(boolean paramBoolean)
    {
      try
      {
        new MainActivity.MainAsyncTask(MainActivity.this).execute(new String[] { "onChange" });
        return;
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
      }
    }
  }

  class SetWallpaper extends AsyncTask<String, Integer, String>
  {
    SetWallpaper()
    {
    }

    protected String doInBackground(String[] paramArrayOfString)
    {
      return null;
    }

    protected void onPostExecute(String paramString)
    {
      MainActivity.this.setWallpaper();
      super.onPostExecute(paramString);
    }
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.activity.MainActivity
 * JD-Core Version:    0.6.2
 */